import { createRouter, createWebHistory } from 'vue-router'
import Home from '../views/Home.vue'
import Layout from "../layout/Layout";

const routes = [
  {
    path: '/',
    name: 'Layout',
    component: Layout,
    redirect: "/assert",
    children:[
      {
        path: '/assert',
        name: 'assert',
        component: () => import("@/views/Home")
      },
      {
        path: '/it',
        name: 'it',
        component: () => import("@/views/View")
      },
      {
        path: '/life',
        name: 'life',
        component: () => import("@/views/Life")
      },
      {
        path: '/in',
        name: 'in',
        component: () => import("@/views/In")
      },
      {
        path: '/text',
        name: 'text',
        component: () => import("@/views/text")
      }
    ]
  }
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
